1. Field of the Invention
The invention relates to the technical field of gamma correction and, more particularly, to a gamma correction system and method using lookup table.
2. Description of Related Art
Typically, a color image processing system is composed of an image sensor, an image recovery and processing unit, an image display and an image compressor. The image capture unit changes light intensity signals sensed by an image sensor into electronic signals to form an image signal. Since there exists a non-linearity between the light intensity signal and the electronic signal, and the electronic signal needs more bit number for higher resolution than that for the units in the post stage, the image signal needs to perform a resolution conversion before entering in the post-stage units. Thus, gamma correction is used to compensate the non-linearity and change the signal from high to low bit number, i.e., from high to low resolution.
U.S. Pat. No. 5,408,267 granted to Main for a “Method and apparatus for gamma correction by mapping, transforming and de-mapping” discloses a gamma correction curve that is divided into multiple consecutive segments with a
  1  areduced scale by input ranges, in which all segments are mapped to a standard segment for generating a gamma correction value through a gamma corrector with respect to the standard segment, and the gamma correction value is de-mapped to a substantial gamma correction value. Because the gamma correction curves have different slopes for each segment, such a segment mapping may cause a great error. U.S. Pat. No. 5,473,372 granted to Nobuoka, et al. for a “Gamma correction circuit approximating non-linear digital conversion” provides a gamma correction curve that is approached by several linear segments with different slopes. However, such a linear approach may also cause a significant error.
To overcome this, a typical technique using a lookup table scheme to reduce the significant error is proposed. FIG. 1A is a schematic view of a gamma correction of converting ten bits into eight bits, which requires a 1K-byte storage space. FIG. 1B is schematic view of a gamma correction of converting 16 bits into 10 bits, which requires an 80K-byte storage space.
It is known that such a lookup table scheme requires a large storage space. To overcome this, FIG. 2 is a schematic view of a typical scheme using a compressed lookup table, which includes a lookup engine 210 and a lookup table 220. The lookup engine 210 has an index mapping device 211 and a correction device 212. FIG. 3A is a schematic view of pseudo codes of the index mapping device 211, where fix[ ] is a floor operator, and fix[v] is, an integer, the closest to v and smaller than or equal to v, for example, fix[2.8]=fix[2.1]=2. FIG. 3B is a schematic view of pseudo codes of the correction device 212. When an input value, denoted as InputValue, equals to ten, the lookup engine 210 outputs a variable main.index with value as one and a variable sub.index with value as two to the lookup table 220 for reading three elements LUT[1][0], LUT[1][1] and LUT[1][2] of the lookup table 220. The element LUT[1][0] stores a 10-bit output value OutputValue[8] and each of the elements LUT[1][1] and LUT[1][2] is a 1-bit output value. The correction device 212 in FIG. 3B adds the elements LUT[1][0], LUT[1][1] and LUT[1][2] to generate a corresponding output value (OutputValue). When converting 16 bits into 10 bits, the lookup table 220 has a size reduced from 80K to 17K bytes ((65536/8)×17 bits=17K bytes). However, for a system-on-chip (SoC) design, it still occupies a lot of gate counts. Therefore, it is desirable to provide an improved gamma correction system and method to mitigate and/or obviate the aforementioned problems.